//
//  ViewController.swift
//  SwiftDemo
//
//  Created by 宏泰财富 on 2018/10/31.
//  Copyright © 2018年 宏泰财富. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        let btn = UIButton(type: .custom)
        btn.frame = CGRect(x: 50, y: 200, width: 200, height: 100)
        btn.backgroundColor = UIColor.yellow
        btn.setTitle("pushOneVc", for: .normal)
        btn.addTarget(self, action:#selector(pushOneVc), for: .touchUpInside)
        btn.setTitleColor(UIColor.black, for: .normal)
        self.view.addSubview(btn)

    }
    
    @objc func pushOneVc(){
        let testOneVc: TestOneController = TestOneController()
        self.navigationController?.pushViewController(testOneVc, animated: true)
    }
}
